package edu.whut.ExtendsDemo;

public class ExtendsDemo02 {
    public static void main(String[] args) {
        Zi zi = new Zi();
        zi.method();
        zi.show();
        zi.love();
    }

}
class Fu{
    int num =10;
    public void show(){
        System.out.println("fu ----show");
    }
    public void love(){
        System.out.println("见面");
        System.out.println("送花");
    }
}
class Zi extends Fu {
    int num = 20;
    public void method(){
        int num = 30;
        System.out.println(num);//30
        System.out.println(this.num);//20
        System.out.println(super.num);//10
    }
    //重载父类方法
    public void show(int num){
        System.out.println("zi ----show");
    }

    //重写父类方法
    @Override
    public void love() {
        super.love();
        System.out.println("看电影");
        System.out.println("表白");
    }
}